

import java.io.*;
import java.util.ArrayList;

public class Test2 {
    public static void main(String[] args) throws IOException {

        ArrayList<String> a = new ArrayList<>();
        File f = new File("d:\\补考名单.txt");
        FileReader fr = new FileReader(f);
        BufferedReader br = new BufferedReader(fr);
        String b;
       while ((b =br.readLine())!=null){
         a.add(b);
   }
        System.out.println(a);
        System.out.println(a.size());

        ArrayList<String> a1 = new ArrayList<>();
        for (int i = 0; i <a1.size() ; i++) {
            if (!a1.contains(a1.get(i))){
                a1.add(a.get(i));
            }
        }
    }
}